/**
 * Definition of VAX (interaction entity).
 *
 * \file vax.hpp
 * \author tomby
 * \date 04-01-2009
 **/

/*  Copyright (C) 2009  Tomas 'tomby' Bily

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */

#ifndef __DBC_VAX__
#define __DBC_VAX__

namespace dbc {

#define IS_DBC_VAX(X) IS_DBC_TYPE(X, dbc::VAX)
#define DBC_VAX(X) DBC_TYPE(X, dbc::VAX)
#define DBC_VAX_PTR(X) DBC_TYPE_PTR(X, dbc::VAX)

  class VAX : public Entity
  {
    ENTITY_DEF (VAX);

  public:
    typedef unsigned int vid_t;

  public:
    class Property
    {
    public:
      typedef int type_t;
      typedef std::vector<std::pair<std::string, int> >		variable_t;
      typedef std::vector<std::pair<std::string, double> >	constant_t;
      typedef boost::shared_ptr<variable_t>			variable_ptr_t;
      typedef boost::shared_ptr<constant_t>			constant_ptr_t;
      typedef boost::shared_ptr<Property>			Ptr;

    protected:
      type_t		type;
      variable_ptr_t	variables;
      constant_ptr_t	constants;

    public:
      type_t get_type ()
      { return type; }

      variable_ptr_t& get_variables ()
      { return variables; }

      constant_ptr_t& get_constants ()
      { return constants; }
    };
    
  private:
    std::string		name;
    vid_t		vid;
    Property::Ptr	property;

  public:

    std::string& get_name ()
    { return name; }

    vid_t get_vid ()
    { return vid; }

    Property::Ptr& get_property ()
    { return property; }
  };

};

#endif
